<style>
.container .floattop{padding-bottom: 0;}
	tr.header { background: #eee;}
	.cpform .txt {width: 220px;display: inline-block;}
	.none { display: none;}
	td em{font-size:12px;color: #777;}
	.top { margin-bottom: 0; padding-bottom: 0; }
	.top a { text-decoration: none;display: inline-block; margin: 0; background:#03a9f4;padding: 10px;font-weight: 400; color: #fff;border-right: 1px solid #fff;}
	.top .a, .top a:hover {background: #009688;color: #fff; }
	table.tb { margin-top: 0; }
	.rq{color: #f00;font-size: 2em}
</style>
{if !$_G['jameson_read']['enableshupiao']}
<h3 class="rq">{lang jameson_read:meiyouqiyongshupiao}</h3>
{/if}
<div class="top">
	<a {if $_GET['piaotype']=='piaojushezhi'}class="a"{/if} href="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=index&piaotype=piaojushezhi">{lang jameson_read:piaojushezhi}</a><a {if $_GET['piaotype']=='tixianshenqing'}class="a"{/if} href="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=index&piaotype=tixianshenqing">{lang jameson_read:tixianshenqing}</a><a {if $_GET['piaotype']=='goumaijilu'}class="a"{/if} href="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=index&piaotype=goumaijilu">{lang jameson_read:goumaijilu}</a><a {if $_GET['piaotype']=='tixianjilu'}class="a"{/if} href="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=index&piaotype=tixianjilu">{lang jameson_read:tixianjilu}</a>
</div>
<div class="piaojushezhi {if $_GET['piaotype']!='piaojushezhi'}none{/if}">
	<h3 class="mtm">{lang jameson_read:tixian}</h3>
	<form action="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=post"  autocomplete="off" method="post" class="cpform" name="cpform">
	<table class="tb tb2">
	<thead class="">
		<tr class="header ">
			<th>{lang jameson_read:piaojumingcheng}</th>
			<th>{lang jameson_read:goumaijiage}/{lang jameson_read:jifenleixing}</th>
			<th>{lang jameson_read:tixianjiage}</th>
		</tr>
	</thead>
	<tbody>
	{loop $piaojus $key $top}
		<tr class="hover threadopt">
			<td><strong>[{$top['name']}]</strong> <em>{$top['descro']}</em></td>
			<td>
				<input class="txt" value="{$top['url']}"  type="text"  name="goumaijiage[{$top['topic_id']}]">
				<select name="jifenleixing[{$top['topic_id']}]">
					{loop $_G['setting']['extcredits'] $id $value}
					<option value="{$id}" {if $top['image']==$id}selected{/if}>{$value['title']}</option>
					{/loop}
				</select>
			</td>
			<td>
				<input value="{$top['adv']}"  class="txt" type="text"  name="tixianjiage[{$top['topic_id']}]">{lang jameson_read:yuan}
			</td>
		</tr>
	{/loop}
	<tr>
		<td colspan="3">
			<input type="hidden" name="formhash" value="{FORMHASH}">
			<input id="submit_editsubmit" class="btn" type="submit" value="{lang jameson_read:tijiao}" name="editsubmit">
		</td>
	</tr>
	</tbody>
	</table>
	</form>
</div>

<div class="goumaijilu {if $_GET['piaotype']!='goumaijilu'} none{/if}">
	<table class="tb tb2">
	<thead>
		<tr class="header">
		<th>{lang jameson_read:xuhao}</th>
		<th>{lang jameson_read:yonghu}</th>
		<th>{lang jameson_read:shuliang}</th>
		<th>{lang jameson_read:piaojuleixing}</th>
		<th>{lang jameson_read:huafei}</th>
		<th>{lang jameson_read:shijian}</th>
		</tr>
	</thead>
	<tbody>
	{if $goumais}
	{loop $goumais $key $top}
		<tr class="hover threadopt">
			<td>{eval echo $key+1;}</td>
			<td><a href="./home.php?mod=space&uid={$top['uid']}" target="_blank">{$top['username']}</a></td>
			<td>{$top['number']}{lang jameson_read:jizhang}</td>
			<td>{$top['name']} </td>
			<td>{$top['money']}{$top['exid']}</td>
			<td>
				{eval echo date('Y-m-d H:i',$top['addtime']);}
			</td>
		</tr>
	{/loop}
	{else}
		<tr>
			<td colspan="6">{lang jameson_read:zanwujilu}</td>
		</tr>
	{/if}
	</tbody>
	</table>
	<div class="margintop marginbot cl right">{$pageshow}</div>
</div>

<div class="tixianjilu {if $_GET['piaotype']!='tixianjilu'} none{/if}">
	<table class="tb tb2">
	<thead>
		<tr class="header">
		<th>{lang jameson_read:xuhao}</th>
		<th>{lang jameson_read:yonghu}</th>
		<th>{lang jameson_read:shuliang}</th>
		<th>{lang jameson_read:piaojuleixing}</th>
		<th>{lang jameson_read:yitixian}</th>
		<th>{lang jameson_read:shijian}</th>
		</tr>
	</thead>
	<tbody>
	{if $tixians}
	{loop $tixians $key $top}
		<tr class="hover threadopt">
			<td>{eval echo $key+1;}</td>
			<td><a href="./home.php?mod=space&uid={$top['uid']}" target="_blank">{$top['username']}</a></td>
			<td>{$top['number']}{lang jameson_read:jizhang}</td>
			<td>{$top['name']}</td>
			<td>{$top['money']}{lang jameson_read:yuan}</td>
			<td>
				{eval echo date('Y-m-d H:i',$top['addtime']);}
			</td>
		</tr>
	{/loop}
	{else}
		<tr>
			<td colspan="6">{lang jameson_read:zanwujilu}</td>
		</tr>
	{/if}
	</tbody>
	</table>
	<div class="margintop marginbot cl right">{$pageshow}</div>
</div>

<div class="tixianshenqing {if $_GET['piaotype']!='tixianshenqing'} none{/if}">
	<table class="tb tb2">
	<thead>
		<tr class="header">
		<th>{lang jameson_read:xuhao}</th>
		<th>{lang jameson_read:shuliang}/{lang jameson_read:jizhang}</th>
		<th>{lang jameson_read:keduihuan}/{lang jameson_read:yuan}</th>
		<th>{lang jameson_read:heji}/{lang jameson_read:yuan}</th>
		<th>{lang jameson_read:yonghu}</th>
		<th>{lang jameson_read:fuyan}</th>
		<th>{lang jameson_read:caozuo}</th>
		</tr>
	</thead>
	<tbody>
	{if $shenqings}
	{loop $shenqings $key $top}
		<tr class="hover threadopt">
			<td>{eval echo $key+1;}</td>
			<td>{$top['book_1']} {$top['name']}</td>
			<td>{$top['book_3']}{lang jameson_read:yuan}</td>
			<td>{$top['book_2']}{lang jameson_read:yuan}</td>
			<td><a href="./?{$top['url']}" target="_blank">{$top['descro']}</a></td>
			<td>
				{$top['image']}
			</td>
			<td>
				<a href="javascript:;"  onclick="tongguo(this)" data-href="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=action&type=1&topic_id={$top['topic_id']}&formhash={FORMHASH}">{lang jameson_read:tongguo}</a>
				<a onclick="jujue(this)" href="javascript:;" data-href="?action=plugins&operation=config&do={$_GET['do']}&identifier=jameson_read&pmod=jameson_read&contrl=mpiao&act=action&type=2&topic_id={$top['topic_id']}&formhash={FORMHASH}">{lang jameson_read:jujue}</a>
			</td>
		</tr>
	{/loop}
	{else}
		<tr>
			<td colspan="7">{lang jameson_read:zanwujilu}</td>
		</tr>
	{/if}
	</tbody>
	</table>
</div>
<script type="text/javascript">
	function jujue(em) {
		var message = prompt('{lang jameson_read:jujueliyou}');
		location.href = em.getAttribute('data-href')+'&message='+message;
	}
	function tongguo(em) {
		if(confirm('{lang jameson_read:querentixian}')){
			location.href = em.getAttribute('data-href');
		}
	}
</script>
<script type="text/javascript" src="./source/plugin/jameson_read/template/adm.js"></script>